package com.java.boot.controller;

import com.java.boot.bean.Car;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jingjintao
 * @date 2021/7/23 - 0:15
 **/
@Slf4j
@RestController
public class HelloController {

    @Autowired
    private Car car;
    @RequestMapping("/car")
    public Car car(){
        return car;
    }

    @RequestMapping("/hello2")
    public String handle01(){
        log.info("请求进来了.....");
        return "Hello Spring Boot 2!"+"你好!";
    }
}
